{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "from github import Github\n",
    "import re\n",
    "import time"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Github 账号和密码"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "username = \"\"\n",
    "password = \"\"\n",
    "with open(\"auth.txt\", \"r\") as f:\n",
    "    username = f.readline().replace('\\n', '')\n",
    "    password = f.readline().replace('\\n', '')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 使用Github官方api获得repository的star数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "g = Github(\"{}\".format(username), \"{}\".format(password))\n",
    "pat = re.compile(r'[(](.*?)[)]', re.S)\n",
    "pl = re.compile(r'[.](.*?)[\\[]', re.S)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "文件名为:  lists.txt\n",
      "pytorch/text 2100+\n",
      "IBM/pytorch-seq2seq 1100+\n",
      "Sandeep42/anuvada 1000-\n",
      "pytorch/audio 1000-\n",
      "facebookresearch/loop 1000-\n",
      "facebookresearch/fairseq-py 7000+\n",
      "awni/speech 1000-\n",
      "OpenNMT/OpenNMT-py 3800+\n",
      "huggingface/neuralcoref 1800+\n",
      "NVIDIA/sentiment-discovery 1000-\n",
      "facebookresearch/MUSE 2300+\n",
      "lium-lst/nmtpytorch 1000-\n",
      "vincentherrmann/pytorch-wavenet 1000-\n",
      "soobinseo/Tacotron-pytorch 1000-\n",
      "allenai/allennlp 8000+\n",
      "PetrochukM/PyTorch-NLP 1600+\n",
      "outcastofmusic/quick-nlp 1000-\n",
      "mozilla/TTS 1800+\n",
      "facebookresearch/LASER 2300+\n",
      "pyannote/pyannote-audio 1000-\n",
      "Maluuba/gensen 1000-\n",
      "pytorch/translate 1000-\n",
      "espnet/espnet 1800+\n",
      "facebookresearch/pythia 3000+\n",
      "facebookresearch/UnsupervisedMT 1300+\n",
      "jsalt18-sentence-repl/jiant 1000-\n",
      "codertimo/BERT-pytorch 3200+\n",
      "facebookresearch/InferSent 1800+\n",
      "google/uis-rnn 1000+\n",
      "zalandoresearch/flair 8100+\n",
      "facebookresearch/pytext 5700+\n",
      "mindslab-ai/voicefilter 1000-\n",
      "kamalkraj/BERT-NER 1000-\n",
      "feedly/transfer-nlp 1000-\n",
      "asyml/texar-pytorch 1000-\n",
      "mravanelli/pytorch-kaldi 1400+\n",
      "NVIDIA/NeMo 1000+\n",
      "harvardnlp/pytorch-struct 1000-\n",
      "freewym/espresso 1000-\n",
      "huggingface/transformers 22500+\n",
      "lucidrains/reformer-pytorch 1000-\n",
      "pytorch/vision 5600+\n",
      "tymokvo/pt-styletransfer 1000-\n",
      "thnkim/OpenFacePytorch 1000-\n",
      "felixgwu/img_classification_pk_pytorch 1000-\n",
      "facebookresearch/SparseConvNet 1000+\n",
      "automan000/Convolution_LSTM_pytorch 1000-\n",
      "1adrianb/face-alignment 3500+\n",
      "ZijunDeng/pytorch-semantic-segmentation 1200+\n",
      "longcw/RoIAlign.pytorch 1000-\n",
      "creafz/pytorch-cnn-finetune 1000-\n",
      "ignacio-rocco/detectorch 1000-\n",
      "mdbloice/Augmentor 3800+\n",
      "jonas-koehler/s2cnn 1000-\n",
      "donnyyou/torchcv 1600+\n",
      "facebookresearch/maskrcnn-benchmark 7200+\n",
      "osmr/imgclsmob 1100+\n",
      "perone/medicaltorch 1000-\n",
      "albu/albumentations 4500+\n",
      "arraiyopensource/kornia 1900+\n",
      "s3nh/text-detector 1000-\n",
      "timesler/facenet-pytorch 1000-\n",
      "facebookresearch/detectron2 8000+\n",
      "Media-Smart/vedaseg 1000-\n",
      "facebookresearch/ClassyVision 1000-\n",
      "alankbi/detecto 1000-\n",
      "facebookresearch/pytorch3d 2300+\n",
      "stepelu/ptstat 1000-\n",
      "uber/pyro 6000+\n",
      "probtorch/probtorch 1000-\n",
      "drckf/paysage 1000-\n",
      "ctallec/pyvarinf 1000-\n",
      "probprog/pyprob 1000-\n",
      "spring-epfl/mia 1000-\n",
      "akanimax/pro_gan_pytorch 1000-\n",
      "pytorch/botorch 1400+\n",
      "mrdrozdov/pytorch-extras 1000-\n",
      "szagoruyko/functional-zoo 1000-\n",
      "ncullen93/torchsample 1400+\n",
      "deepcraft/torchcraft-py 1000-\n",
      "ramon-oliveira/aorun 1000-\n",
      "oval-group/logger 1000-\n",
      "iamaziz/PyTorch-docset 1000-\n",
      "clcarwin/convert_torch_to_pytorch 1000-\n",
      "Cadene/pretrained-models.pytorch 6100+\n",
      "locuslab/pytorch_fft 1000-\n",
      "fanq15/caffe_to_torch_to_pytorch 1000-\n",
      "sniklaus/pytorch-extension 1000-\n",
      "lanpa/tensorboard-pytorch 6000+\n",
      "jrg365/gpytorch 1800+\n",
      "maciejkula/spotlight 2000+\n",
      "awentzonline/pytorch-cns 1000-\n",
      "szagoruyko/pyinn 1000-\n",
      "nasimrahaman/inferno 1000-\n",
      "henryre/pytorch-fitmodule 1000-\n",
      "dnouri/inferno 2900+\n",
      "marvis/pytorch-caffe-darknet-convert 1000-\n",
      "longcw/pytorch2caffe 1000-\n",
      "nearai/pytorch-tools 1000-\n",
      "taolei87/sru 1700+\n",
      "prisma-ai/torch2coreml 1000-\n",
      "zhanghang1989/PyTorch-Encoding 1200+\n",
      "ryanleary/pytorch-ctc 1000-\n",
      "t-vi/candlegp 1000-\n",
      "loudinthecloud/dpwa 1000-\n",
      "koz4k/dni-pytorch 1000-\n",
      "dnouri/skorch 2900+\n",
      "pytorch/ignite 2500+\n",
      "glample/Arnold 1000-\n",
      "albanie/pytorch-mcn 1000-\n",
      "chenyuntc/simple-faster-rcnn-pytorch 2100+\n",
      "DL-IT/generative_zoo 1000-\n",
      "szagoruyko/pytorchviz 1100+\n",
      "cogitare-ai/cogitare 1000-\n",
      "dmarnerides/pydlt 1000-\n",
      "wohlert/semi-supervised-pytorch 1000-\n",
      "rusty1s/pytorch_cluster 1000-\n",
      "aditya-khant/neural-assembly-compiler 1000-\n",
      "vadimkantorov/caffemodel2pytorch 1000-\n",
      "pytorch/extension-cpp 1000-\n",
      "GRAAL-Research/pytoune 1000-\n",
      "dusty-nv/jetson-reinforcement 1000-\n",
      "salesforce/matchbox 1000-\n",
      "josipd/torch-two-sample 1000-\n",
      "sksq96/pytorch-summary 2000+\n",
      "BelBES/mpl.pytorch 1000-\n",
      "YosefLab/scVI-dev null\n",
      "NVIDIA/apex 3400+\n",
      "pytorch/ELF 3000+\n",
      "EKami/Torchlite 1000-\n",
      "Schlumberger/joint-vae 1000-\n",
      "kengz/SLM-Lab 1000-\n",
      "Hananel-Hazan/bindsnet 1000-\n",
      "akanimax/pro_gan_pytorch 1000-\n",
      "rusty1s/pytorch_geometric 6600+\n",
      "knighton/torchplus 1000-\n",
      "zuoxingdong/lagom 1000-\n",
      "ecs-vlc/torchbearer 1000-\n",
      "tristandeleu/pytorch-maml-rl 1000-\n",
      "bharathgs/NALU 1000-\n",
      "PIQuIL/QuCumber 1000-\n",
      "MagNet-DL/magnet 1000-\n",
      "jbohnslav/opencv_transforms 1000-\n",
      "fastai/fastai 17100+\n",
      "RobotLocomotion/pytorch-dense-correspondence 1000-\n",
      "richzhang/colorization-pytorch 1000-\n",
      "cms-flash/beauty-net 1000-\n",
      "Mariewelt/OpenChem 1000-\n",
      "aiqm/torchani 1000-\n",
      "hjmshi/PyTorch-LBFGS 1000-\n",
      "cornellius-gp/gpytorch 1800+\n",
      "mariogeiger/hessian 1000-\n",
      "MillionIntegrals/vel 1000-\n",
      "msamogh/nonechucks 1000-\n",
      "Swall0w/torchstat 1000-\n",
      "pytorch/QNNPACK 1200+\n",
      "rtqichen/torchdiffeq 2700+\n",
      "BachiLi/redner 1000-\n",
      "masa-su/pixyz 1000-\n",
      "perone/euclidesdb 1000-\n",
      "nerox8664/pytorch2keras 1000-\n",
      "domainadaptation/salad 1000-\n",
      "Erotemic/netharn 1000-\n",
      "dmlc/dgl 4000+\n",
      "CSAILVision/gandissect 1400+\n",
      "justusschock/delira 1000-\n",
      "AIRLab-POLIMI/mushroom 1000-\n",
      "thuml/Xlearn 1000-\n",
      "ferrine/geoopt 1000-\n",
      "unit8co/vegans 1000-\n",
      "arraiyopensource/kornia 1900+\n",
      "BorealisAI/advertorch 1000-\n",
      "Luolc/AdaBound 2700+\n",
      "mblondel/fenchel-young-losses 1000-\n",
      "Lyken17/pytorch-OpCounter 1400+\n",
      "kaihsin/Tor10 1000-\n",
      "catalyst-team/catalyst 1600+\n",
      "facebook/Ax 1000+\n",
      "achaiah/pywick 1000-\n",
      "kakaobrain/torchgpipe 1000-\n",
      "pytorch/hub 1000-\n",
      "williamFalcon/pytorch-lightning 3800+\n",
      "kaihsin/Tor10 1000-\n",
      "microsoft/tensorwatch 2700+\n",
      "fancompute/wavetorch 1000-\n",
      "ag14774/diffdist 1000-\n",
      "awwong1/torchprof 1000-\n",
      "oxfordcontrol/osqpth 1000-\n",
      "mctorch/mctorch 1000-\n",
      "noahgolmant/pytorch-hessian-eigenthings 1000-\n",
      "StanfordVL/MinkowskiEngine 1000-\n",
      "Omegastick/pytorch-cpp-rl 1000-\n",
      "BloodAxe/pytorch-toolbelt 1000-\n",
      "Fonbet/argus-tensor-stream 1000-\n",
      "hal3/macarico 1000-\n",
      "astooke/rlpyt 1200+\n",
      "blue-season/pywarm 1000-\n",
      "learnables/learn2learn 1000-\n",
      "facebookresearch/torchbeast 1000-\n",
      "facebookresearch/higher 1000-\n",
      "Vermeille/Torchelie/ null\n",
      "facebookresearch/CrypTen 1000-\n",
      "cvxgrp/cvxpylayers 1000-\n",
      "HobbitLong/RepDistiller 1000-\n",
      "NVIDIAGameWorks/kaolin 1700+\n",
      "BasBuller/PySNN 1000-\n",
      "dmmiller612/sparktorch 1000-\n",
      "KevinMusgrave/pytorch-metric-learning 1000-\n",
      "cpnota/autonomous-learning-library 1000-\n",
      "asappresearch/flambe 1000-\n",
      "jettify/pytorch-optimizer 1000-\n",
      "spro/practical-pytorch 3800+\n",
      "yunjey/pytorch-tutorial 15500+\n",
      "keon/pytorch-exercises 1000-\n",
      "pytorch/tutorials 3300+\n",
      "pytorch/examples 11900+\n",
      "napsternxg/pytorch-practice 1000-\n",
      "vinhkhuc/PyTorch-Mini-Tutorials 1000-\n",
      "xiayandi/Pytorch_text_classification 1000-\n",
      "desimone/pytorch-cat-vs-dogs 1000-\n",
      "eladhoffer/convNet.pytorch 1000-\n",
      "mailmahee/pytorch-generative-adversarial-networks 1000-\n",
      "amdegroot/pytorch-containers 1000-\n",
      "cemoody/topicsne 1000-\n",
      "fducau/AAE_pytorch 1000-\n",
      "GunhoChoi/Kind_PyTorch_Tutorial 1000-\n",
      "justdark/pytorch-poetry-gen 1000-\n",
      "JamesChuanggg/pytorch-REINFORCE 1000-\n",
      "MorvanZhou/PyTorch-Tutorial 4300+\n",
      "joansj/pytorch-intro 1000-\n",
      "bearpaw/pytorch-classification 1000-\n",
      "hardmaru/pytorch_notebooks 1000-\n",
      "soravux/pytorch_tutorial 1000-\n",
      "Spandan-Madan/Pytorch_fine_tuning_Tutorial 1000-\n",
      "Kyubyong/pytorch_exercises 1000-\n",
      "soumith/traffic-sign-detection-homework 1000-\n",
      "Js-Mim/mss_pytorch 1000-\n",
      "DSKSD/DeepNLP-models-Pytorch 2200+\n",
      "mila-udem/welcome_tutorials 1000-\n",
      "moskomule/pytorch.rl.learning 1000-\n",
      "keon/seq2seq 1000-\n",
      "JeanKossaifi/tensorly-notebooks 1000-\n",
      "jpeg729/pytorch_bits 1000-\n",
      "sanyam5/skip-thoughts 1000-\n",
      "xiadingZ/video-caption-pytorch 1000-\n",
      "higgsfield/Capsule-Network-Tutorial 1000-\n",
      "SherlockLiao/code-of-learn-deep-learning-with-pytorch 1700+\n",
      "higgsfield/RL-Adventure 1800+\n",
      "hpcgarage/accelerated_dl_pytorch 1000-\n",
      "higgsfield/RL-Adventure-2 2000+\n",
      "wkentaro/pytorch-for-numpy-users 1000-\n",
      "Kaixhin/grokking-pytorch 1000-\n",
      "Atcold/PyTorch-Deep-Learning-Minicourse 1600+\n",
      "utkuozbulak/pytorch-custom-dataset-examples 1000-\n",
      "furkanu/deeplearning.ai-pytorch 1000-\n",
      "tobiascz/MNIST_Pytorch_python_and_capi 1000-\n",
      "ne7ermore/torch_light 1000-\n",
      "dribnet/portrain-gan 1000-\n",
      "omarsar/mri-analysis-pytorch 1000-\n",
      "davidcpage/cifar10-fast 1000-\n",
      "bentrevett/pytorch-sentiment-analysis 1500+\n",
      "rwightman/pytorch-image-models 2600+\n",
      "BIGBALLON/CIFAR-ZOO 1000-\n",
      "dsgiitr/d2l-pytorch 2700+\n",
      "stared/thinking-in-tensors-writing-in-pytorch 1000-\n",
      "lemonhu/NER-BERT-pytorch 1000-\n",
      "dougsouza/pytorch-sync-batchnorm-example 1000-\n",
      "barissayil/SentimentAnalysis 1000-\n",
      "neuralix/google_evolution 1000-\n",
      "edouardoyallon/pyscatwave 1000-\n",
      "edouardoyallon/scalingscattering 1000-\n",
      "episodeyang/deep-auto-punctuation 1000-\n",
      "tensorboy/pytorch_Realtime_Multi-Person_Pose_Estimation 1000-\n",
      "onlytailei/PyTorch-value-iteration-networks 1000-\n",
      "analvikingur/pytorch_Highway 1000-\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "analvikingur/pytorch_NEG_loss 1000-\n",
      "analvikingur/pytorch_RVAE 1000-\n",
      "analvikingur/pytorch_TDNN 1000-\n",
      "moskomule/eve.pytorch 1000-\n",
      "locuslab/e2e-model-learning 1000-\n",
      "mrzhu-cool/pix2pix-pytorch 1000-\n",
      "amdegroot/ssd.pytorch 3300+\n",
      "carpedm20/DiscoGAN-pytorch 1000-\n",
      "SKTBrain/DiscoGAN 1000-\n",
      "atgambardella/pytorch-es 1000-\n",
      "bodokaiser/piwise 1000-\n",
      "transedward/pytorch-dqn 1000-\n",
      "ruotianluo/neuraltalk2.pytorch 1000-\n",
      "mattmacy/vnet.pytorch 1000-\n",
      "wkentaro/pytorch-fcn 1000+\n",
      "xternalz/WideResNet-pytorch 1000-\n",
      "c0nn3r/pytorch_highway_networks 1000-\n",
      "ypxie/pytorch-NeuCom 1000-\n",
      "eladhoffer/captionGen 1000-\n",
      "jayleicn/animeGAN 1000-\n",
      "Shawn1993/cnn-text-classification-pytorch 1000-\n",
      "SeanNaren/deepspeech.pytorch 1200+\n",
      "MaximumEntropy/Seq2Seq-PyTorch 1000-\n",
      "rarilurelo/pytorch_a3c 1000-\n",
      "bamos/densenet.pytorch 1000-\n",
      "alykhantejani/nninit 1000-\n",
      "longcw/faster_rcnn_pytorch 1300+\n",
      "akolishchak/doom-net-pytorch 1000-\n",
      "ClementPinard/FlowNetPytorch 1000-\n",
      "gsp-27/pytorch_Squeezenet 1000-\n",
      "martinarjovsky/WassersteinGAN 2500+\n",
      "locuslab/optnet 1000-\n",
      "locuslab/qpth 1000-\n",
      "ikostrikov/pytorch-naf 1000-\n",
      "ikostrikov/pytorch-meta-optimizer 1000-\n",
      "darkstar112358/fast-neural-style 1000-\n",
      "leongatys/PytorchNeuralStyleTransfer 1000-\n",
      "bengxy/FastNeuralStyle 1000-\n",
      "alexis-jacq/Pytorch-Tutorials 1000-\n",
      "zuoxingdong/VIN_PyTorch_Visdom 1000-\n",
      "longcw/yolo2-pytorch 1200+\n",
      "szagoruyko/attention-transfer 1000+\n",
      "potterhsu/SVHNClassifier-PyTorch 1000-\n",
      "oeway/pytorch-deform-conv 1000-\n",
      "carpedm20/BEGAN-pytorch 1000-\n",
      "dasguptar/treelstm.pytorch 1000-\n",
      "DmitryUlyanov/AGE 1000-\n",
      "prlz77/ResNeXt.pytorch 1000-\n",
      "jingweiz/pytorch-rl 1000-\n",
      "sujithv28/Deep-Leafsnap 1000-\n",
      "junyanz/pytorch-CycleGAN-and-pix2pix 11000+\n",
      "onlytailei/A3C-PyTorch 1000-\n",
      "kentsommer/pytorch-value-iteration-networks 1000-\n",
      "zhanghang1989/PyTorch-Style-Transfer 1000-\n",
      "isht7/pytorch-deeplab-resnet 1000-\n",
      "fxia22/pointnet.pytorch 1000-\n",
      "aaron-xichen/pytorch-playground 1700+\n",
      "jingweiz/pytorch-dnc 1000-\n",
      "jinfagang/pytorch_image_classifier 1000-\n",
      "yunjey/mnist-svhn-transfer 1000-\n",
      "marvis/pytorch-yolo2 1000-\n",
      "andrewliao11/dni.pytorch 1000-\n",
      "caogang/wgan-gp 1000-\n",
      "spro/pytorch-seq2seq-intent-parsing 1000-\n",
      "demelin/pyTorch_NCE 1000-\n",
      "cxhernandez/molencoder 1000-\n",
      "stormraiser/GAN-weight-norm 1000-\n",
      "rachtsingh/lgamma 1000-\n",
      "eladhoffer/bigBatch 1000-\n",
      "dgriff777/rl_a3c_pytorch 1000-\n",
      "ahirner/pytorch-retraining 1000-\n",
      "priba/nmp_qc 1000-\n",
      "jacobgil/pytorch-grad-cam 1000+\n",
      "mjacar/pytorch-trpo 1000-\n",
      "jacobgil/pytorch-explain-black-box 1000-\n",
      "jmtomczak/vae_vpflows 1000-\n",
      "kimhc6028/relational-networks 1000-\n",
      "Cadene/vqa.pytorch 1000-\n",
      "facebookresearch/end-to-end-negotiator 1200+\n",
      "ShiyuLiang/odin-pytorch 1000-\n",
      "ajbrock/FreezeOut 1000-\n",
      "jakezhaojb/ARAE 1000-\n",
      "kimhc6028/forward-thinking-pytorch 1000-\n",
      "BoyuanJiang/context_encoder_pytorch 1000-\n",
      "jadore801120/attention-is-all-you-need-pytorch 3600+\n",
      "thnkim/OpenFacePytorch 1000-\n",
      "pemami4911/neural-combinatorial-rl-pytorch 1000-\n",
      "mjacar/pytorch-nec 1000-\n",
      "eladhoffer/seq2seq.pytorch 1000-\n",
      "alexis-jacq/Pytorch-Sketch-RNN 1000-\n",
      "jacobgil/pytorch-pruning 1000-\n",
      "hitvoice/DrQA 1000-\n",
      "JianGoForIt/YellowFin_Pytorch 1000-\n",
      "deepsound-project/samplernn-pytorch 1000-\n",
      "tymokvo/AEGeAN 1000-\n",
      "twtygqyy/pytorch-SRResNet 1000-\n",
      "fartashf/vsepp 1000-\n",
      "alexis-jacq/Pytorch-DPPO 1000-\n",
      "mingyuliutw/UNIT 1500+\n",
      "gpleiss/efficient_densenet_pytorch 1100+\n",
      "yjxiong/tsn-pytorch 1000-\n",
      "ajbrock/SMASH 1000-\n",
      "kuangliu/pytorch-retinanet 1000-\n",
      "aosokin/biogans 1000-\n",
      " woozzu/dong_iccv_2017 null\n",
      "jmhessel/fmpytorch 1000-\n",
      "ZhouYanzhao/ORN 1000-\n",
      "katerakelly/pytorch-maml 1000-\n",
      "znxlwm/pytorch-generative-model-collections 1900+\n",
      "markdtw/vqa-winner-cvprw-2017 1000-\n",
      "r9y9/tacotron_pytorch 1000-\n",
      "Lextal/pspnet-pytorch 1000-\n",
      "LiyuanLucasLiu/LM-LSTM-CRF 1000-\n",
      "1adrianb/face-alignment 3500+\n",
      "ClementPinard/DepthNet 1000-\n",
      "thstkdgus35/EDSR-PyTorch 1100+\n",
      "ethanluoyc/e2c-pytorch 1000-\n",
      "kenshohara/3D-ResNets-PyTorch 1900+\n",
      "khanhptnk/bandit-nmt 1000-\n",
      "ikostrikov/pytorch-a2c-ppo-acktr 1700+\n",
      "baldassarreFe/zalando-pytorch 1000-\n",
      "clcarwin/sphereface_pytorch 1000-\n",
      "floringogianu/categorical-dqn 1000-\n",
      "loudinthecloud/pytorch-ntm 1000-\n",
      "felixgwu/mask_rcnn_pytorch null\n",
      "xbresson/graph_convnets_pytorch 1000-\n",
      "ruotianluo/pytorch-faster-rcnn 1400+\n",
      "huggingface/torchMoji 1000-\n",
      "hangzhaomit/semantic-segmentation-pytorch 3000+\n",
      "salesforce/pytorch-qrnn 1100+\n",
      "theeluwin/pytorch-sgns 1000-\n",
      "ClementPinard/SfmLearner-Pytorch 1000-\n",
      "1zb/deformable-convolution-pytorch 1000-\n",
      "fanglanting/skip-gram-pytorch 1000-\n",
      "hanzhanggit/StackGAN-v2 1000-\n",
      "ruotianluo/self-critical.pytorch 1000-\n",
      "tkipf/pygcn 2200+\n",
      "ixaxaar/pytorch-dnc 1000-\n",
      "ptrblck/prog_gans_pytorch_inference 1000-\n",
      "timomernick/pytorch-capsule 1000-\n",
      "dyhan0920/PyramidNet-PyTorch 1000-\n",
      "gram-ai/radio-transformer-networks 1000-\n",
      "castorini/honk 1000-\n",
      "SSARCandy/DeepCORAL 1000-\n",
      "bearpaw/pytorch-pose 1000-\n",
      "karandesai-96/lang-emerge-parlai 1000-\n",
      "Kaixhin/Rainbow 1000-\n",
      "gdlg/pytorch_compact_bilinear_pooling 1000-\n",
      "DeepInsight-PCALab/CompactBilinearPooling-Pytorch 1000-\n",
      "gitabcworld/FewShotLearning 1000-\n",
      "jklj077/meProp 1000-\n",
      "clcarwin/SFD_pytorch 1000-\n",
      "facebookresearch/GradientEpisodicMemory 1000-\n",
      "KupynOrest/DeblurGAN 1500+\n",
      "yunjey/StarGAN 4400+\n",
      "adambielski/CapsNet-pytorch 1000-\n",
      "ShichenLiu/CondenseNet 1000-\n",
      "DmitryUlyanov/deep-image-prior 5600+\n",
      "natanielruiz/deep-head-pose 1000-\n",
      "zhunzhong07/Random-Erasing 1000-\n",
      "facebookresearch/FaderNetworks 1000-\n",
      "NVIDIA/flownet2-pytorch 1700+\n",
      "NVIDIA/pix2pixHD 4300+\n",
      "pkdn/pytorch-smoothgrad 1000-\n",
      "c0nn3r/RetinaNet 1000-\n",
      "jwyang/faster-rcnn.pytorch 4800+\n",
      "leehomyc/mixup_pytorch 1000-\n",
      "mapillary/inplace_abn 1000-\n",
      "xingyizhou/pytorch-pose-hg-3d 1000-\n",
      "HarshTrivedi/nmn-pytorch 1000-\n",
      "kefirski/bytenet 1000-\n",
      "hengyuan-hu/bottom-up-attention-vqa 1000-\n",
      "ruiminshen/yolo2-pytorch 1000-\n",
      "Wizaron/reseg-pytorch 1000-\n",
      "Wizaron/binary-stochastic-neurons 1000-\n",
      "DavexPro/pytorch-pose-estimation 1000-\n",
      "higgsfield/interaction_network_pytorch 1000-\n",
      "wlwkgus/NoisyNaturalGradient 1000-\n",
      "moskomule/ewc.pytorch 1000-\n",
      "jacobgil/pytorch-zssr 1000-\n",
      "atiyo/deep_image_prior 1000-\n",
      "leviswind/pytorch-transformer 1000-\n",
      "devendrachaplot/DeepRL-Grounding 1000-\n",
      "Wizaron/deep-forecast-pytorch 1000-\n",
      "utiasSTARS/cat-net 1000-\n",
      "tneumann/minimal_glo 1000-\n",
      "dragen1860/LearningToCompare-Pytorch 1000-\n",
      "facebookresearch/poincare-embeddings 1200+\n",
      "Hessian-vector product version null\n",
      "JamesChuanggg/ggnn.pytorch 1000-\n",
      "Mrgemy95/visual-interaction-networks-pytorch 1000-\n",
      "jhayes14/adversarial-patch 1000-\n",
      "orobix/Prototypical-Networks-for-Few-shot-Learning-PyTorch 1000-\n",
      "orobix/Visual-Feature-Attribution-Using-Wasserstein-GANs-Pytorch 1000-\n",
      "Blade6570/PhotographicImageSynthesiswithCascadedRefinementNetworks-Pytorch 1000-\n",
      "carpedm20/ENAS-pytorch 2100+\n",
      "kentsyx/Neural-IMage-Assessment 1000-\n",
      "tfrerix/proxprop 1000-\n",
      "NVIDIA/FastPhotoStyle 10100+\n",
      "Ben-Louis/Deep-Image-Analogy-PyTorch 1000-\n",
      "layumi/Person_reID_baseline_pytorch 1800+\n",
      "zalandoresearch/pt-dilate-rnn 1000-\n",
      "jhjacobsen/pytorch-i-revnet 1000-\n",
      "Orcuslc/OrthNet 1000-\n",
      "jt827859032/DRRN-pytorch 1000-\n",
      "moskomule/shampoo.pytorch 1000-\n",
      "truskovskiyk/nima.pytorch 1000-\n",
      "locuslab/TCN 2100+\n",
      "shahsohil/DCC 1000-\n",
      "arunmallya/packnet 1000-\n",
      "github-pengge/PyTorch-progressive_growing_of_gans 1000-\n",
      "salesforce/nonauto-nmt 1000-\n",
      "eriklindernoren/PyTorch-GAN 5500+\n",
      "tomrunia/PyTorchWavelets 1000-\n",
      "karpathy/pytorch-made 1000-\n",
      "emited/VariationalRecurrentNeuralNetwork 1000-\n",
      "emited/flow 1000-\n",
      "r9y9/deepvoice3_pytorch 1200+\n",
      "elanmart/psmm 1000-\n",
      "NVIDIA/tacotron2 1400+\n",
      "rahulkidambi/AccSGD 1000-\n",
      "hengruo/QANet-pytorch 1000-\n",
      "TimDettmers/ConvE 1000-\n",
      "kaushalshetty/Structured-Self-Attention 1000-\n",
      "williamleif/graphsage-simple 1000-\n",
      "roytseng-tw/Detectron.pytorch 2600+\n",
      "irhumshafkat/R2Plus1D-PyTorch 1000-\n",
      "viking-sudo-rm/StackNN 1000-\n",
      "facebookresearch/translagent 1000-\n",
      "jnhwkim/ban-vqa 1000-\n",
      "huggingface/pytorch-openai-transformer-lm 1100+\n",
      "akanimax/T2F 1000-\n",
      "mseitzer/pytorch-fid 1000-\n",
      "jmtomczak/vae_vpflows 1000-\n",
      "mkocabas/CoordConv-pytorch 1000-\n",
      "xternalz/SDPoint 1000-\n",
      "wxywhu/SRDenseNet-pytorch 1000-\n",
      "LMescheder/GAN_stability 1000-\n",
      "wannabeOG/Mask-RCNN 1000-\n",
      "chaoyuaw/pytorch-coviar 1000-\n",
      "chenxi116/PNASNet.pytorch 1000-\n",
      "kevinzakka/NALU-pytorch 1000-\n",
      "alexis-jacq/LOLA_DiCE 1000-\n",
      "wohlert/generative-query-network-pytorch 1000-\n",
      "wmvanvliet/pytorch_hmax 1000-\n",
      "yunlongdong/FCN-pytorch-easiest 1000-\n",
      "awni/transducer 1000-\n",
      "artix41/AVO-pytorch 1000-\n",
      "huguyuehuhu/HCN-pytorch 1000-\n",
      "szagoruyko/binary-wide-resnet 1000-\n",
      "arunmallya/piggyback 1000-\n",
      "NVIDIA/vid2vid 7100+\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "cranmer/poisson-convolution-sum 1000-\n",
      "davidmascharka/tbd-nets 1000-\n",
      "elbayadm/attn2d 1000-\n",
      "ultralytics/yolov3 3500+\n",
      "duc0/deep-dream-in-pytorch 1000-\n",
      "ikostrikov/pytorch-flows 1000-\n",
      "ars-ashuha/quantile-regression-dqn-pytorch 1000-\n",
      "L0SG/relational-rnn-pytorch 1000-\n",
      "scaelles/DEXTR-PyTorch 1000-\n",
      "rdspring1/PyTorch_GBW_LM 1000-\n",
      "Stonesjtu/Pytorch-NCE 1000-\n",
      "shayneobrien/generative-models 1000-\n",
      "andreasveit/convnet-aig 1000-\n",
      "TianhongDai/integrated-gradient-pytorch 1000-\n",
      "Alexander-H-Liu/MalConv-Pytorch 1000-\n",
      "locuslab/trellisnet 1000-\n",
      "minqi/learning-to-communicate-pytorch 1000-\n",
      "michaelklachko/pnn.pytorch 1000-\n",
      "rainofmine/Face_Attention_Network 1000-\n",
      "NVIDIA/waveglow 1300+\n",
      "facebookresearch/deepfloat 1000-\n",
      "subeeshvasu/2018_subeesh_epsr_eccvw 1000-\n",
      "ksw0306/ClariNet 1000-\n",
      "huggingface/pytorch-pretrained-BERT 22500+\n",
      "npuichigo/waveglow 1000-\n",
      "cleardusk/3DDFA 2300+\n",
      "tomgoldstein/loss-landscape 1100+\n",
      "zalandoresearch/famos 1000-\n",
      "anuragranj/back2future.pytorch 1000-\n",
      "mozilla/FFTNet 1000-\n",
      "zisianw/FaceBoxes.PyTorch 1000-\n",
      "kimiyoung/transformer-xl 2300+\n",
      "jalexvig/associative_compression_networks 1000-\n",
      "jolibrain/fluidnet_cxx 1000-\n",
      "p-christ/Deep-Reinforcement-Learning-Algorithms-with-PyTorch 2100+\n",
      "ericsun99/Shufflenet-v2-Pytorch 1000-\n",
      "benedekrozemberczki/GraphWaveletNeuralNetwork 1000-\n",
      "benedekrozemberczki/AttentionWalk 1000-\n",
      "benedekrozemberczki/SGCN 1000-\n",
      "benedekrozemberczki/SINE 1000-\n",
      "benedekrozemberczki/GAM 1000-\n",
      "ProGamerGov/neural-style-pt 1000-\n",
      "ibalazevic/TuckER 1000-\n",
      "BayesWatch/pytorch-prunes 1000-\n",
      "benedekrozemberczki/SimGNN 1000-\n",
      "ahmedbesbes/character-based-cnn 1000-\n",
      "facebookresearch/XLM 1900+\n",
      "eth-sri/diffai 1000-\n",
      "benedekrozemberczki/APPNP 1000-\n",
      "benedekrozemberczki/MixHop-and-N-GCN 1000-\n",
      "graykode/gpt-2-Pytorch 1000-\n",
      "benedekrozemberczki/Splitter 1000-\n",
      "benedekrozemberczki/CapsGNN 1000-\n",
      "ajbrock/BigGAN-PyTorch 1700+\n",
      "mhubii/ppo_pytorch_cpp 1000-\n",
      "seungwonpark/RandWireNN 1000-\n",
      "joel-huang/zeroshot-capsnet-pytorch 1000-\n",
      "benedekrozemberczki/SEAL-CI 1000-\n",
      "benedekrozemberczki/MixHop-and-N-GCN 1000-\n",
      "Lotayou/densebody_pytorch 1000-\n",
      "mindslab-ai/voicefilter 1000-\n",
      "NVIDIA/semantic-segmentation 1000-\n",
      "benedekrozemberczki/ClusterGCN 1000-\n",
      "NVlabs/DG-Net 1000-\n",
      "baidu-research/NCRF 1000-\n",
      "ducha-aiki/pytorch-sift 1000-\n",
      "mateuszbuda/brain-segmentation-pytorch 1000-\n",
      "rosinality/glow-pytorch 1000-\n",
      "zsef123/EfficientNets-PyTorch 1000-\n",
      "nv-tlabs/STEAL 1000-\n",
      "alecwangcq/EigenDamage-Pytorch 1000-\n",
      "ruidan/Aspect-level-sentiment 1000-\n",
      "nyukat/breast_cancer_classifier 1000-\n",
      "AaltoVision/DGC-Net 1000-\n",
      "Eric-Wallace/universal-triggers 1000-\n",
      "p-christ/Deep-Reinforcement-Learning-Algorithms-with-PyTorch 2100+\n",
      "alibaba-edu/simple-effective-text-matching-pytorch 1000-\n",
      "ASMA null\n",
      "NVIDIA/unsupervised-video-interpolation 1000-\n",
      "ritchieng/the-incredible-pytorch 4500+\n",
      "wiseodd/generative-models 5800+\n",
      "https://hub.docker.com/r/escong/pytorch-notebook/ null\n",
      "kendricktan/drawlikebobross 1000-\n",
      "t-vi/pytorch-tvmisc 1000-\n",
      "andrewliao11/pytorch-a3c-mujoco 1000-\n",
      "jinfagang/pytorch_chatbot 1000-\n",
      "Kaixhin/malmo-challenge 1000-\n",
      "jtoy/sketchnet 1000-\n",
      "QuantScientist/Deep-Learning-Boot-Camp 1200+\n",
      "mratsim/Amazon_Forest_Computer_Vision 1000-\n",
      "junxiaosong/AlphaZero_Gomoku 1900+\n",
      "youansheng/pytorch-cv null\n",
      "KaiyangZhou/deep-person-reid 1900+\n",
      "victoresque/pytorch-template 1500+\n",
      "svishnu88/DLwithPyTorch 1000-\n",
      "jalola/compare-tensorflow-pytorch 1000-\n",
      "hasktorch/hasktorch 1000-\n",
      "fragcolor-xyz/nimtorch 1000-\n",
      "John-Ellis/derplearning 1000-\n",
      "tugstugi/pytorch-saltnet 1000-\n",
      "peterjc123/pytorch-scripts 1000-\n",
      "ptrblck/pytorch_misc 1000-\n",
      "arnas/awesome-pytorch-scholarship 1000-\n",
      "mmirman/MentisOculi 1000-\n",
      "karanchahal/DoodleMaster 2400+\n",
      "LaurentMazare/ocaml-torch 1000-\n",
      "pytorch/extension-script 1000-\n",
      "zccyman/pytorch-inference 1000-\n",
      "Wizaron/pytorch-cpp-inference 1000-\n",
      "LaurentMazare/tch-rs 1000-\n",
      "interesaaat/TorchSharp 1000-\n",
      "ml-tooling/ml-workspace 1000-\n",
      "IgorSusmelj/pytorch-styleguide 1000-\n"
     ]
    }
   ],
   "source": [
    "fin = open(\"lists.txt\", \"r+\")\n",
    "print (\"文件名为: \", fin.name)\n",
    "\n",
    "fout = open(\"result.txt\", \"w+\")\n",
    "\n",
    "line = fin.readline()               \n",
    "while line:   \n",
    "    if \"https://github.com/\" in line:\n",
    "        stars_str = re.findall(pl, line)[0]\n",
    "        repo_name = re.findall(pat, line)[0].replace(\"https://github.com/\", \"\")\n",
    "        stars = \"\"\n",
    "        try: \n",
    "            repo = g.get_repo(repo_name)\n",
    "            time.sleep(1)\n",
    "            star_count = repo.stargazers_count\n",
    "            if star_count < 1000:\n",
    "                stars = \"1000-\"\n",
    "            else:\n",
    "                stars = str(star_count - star_count%100) + \"+\"\n",
    "        except Exception:\n",
    "            stars = \"null\"\n",
    "        print(repo_name, stars)\n",
    "        line = line.replace(stars_str, \" <kbd>{}</kbd> \".format(stars), 1)\n",
    "#     print(line)\n",
    "        \n",
    "    fout.write(line)\n",
    "    line = fin.readline()   \n",
    "    \n",
    "fout.close()\n",
    "fin.close()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "# try: \n",
    "#     repo = g.get_repo(\"YosefLab/scVI-dev\")\n",
    "#     print(repo.stargazers_count)\n",
    "# except Exception:\n",
    "#     print(\"null\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.4"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
